local status, plug = pcall(require, "go")
if not status then
	vim.notify("没有找到 ray-x go.nvim")
	return
end

plug.setup()

require("go").setup({ ... })

local lsp_installer_servers = require("nvim-lsp-installer.servers")

local server_available, requested_server = lsp_installer_servers.get_server("gopls")
if server_available then
	requested_server:on_ready(function()
		local opts = require("go.lsp").config() -- config() return the go.nvim gopls setup
		requested_server:setup(opts)
	end)
	if not requested_server:is_installed() then
		-- Queue the server to be installed
		requested_server:install()
	end
end
